package com.highper.scheduled.task;

import cn.dev33.satoken.id.SaIdUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @Author ZhangGJ
 * @Date 2022/02/07 10:33
 */
@Slf4j
@Configuration
public class SaTokenScheduled {

    @Scheduled(cron = "0 0/5 * * * ? ")
    public void refreshToken(){
        log.info("Refresh token.");
        SaIdUtil.refreshToken();
    }

}
